/* javascript for templates/views_statistics_admin/user_statistics.html */

/* 每个用户创建的bug 数 */
function init_user_create_bug_chart()
{
    req = new Chujue_Request();
    req.url = "/admin/user-create-bugs-chart";
    req.is_setmessage = false;
    req.ok_func = function(data) {
        $("#morris-create-bug-chart").empty();
        Morris.Bar({
            element: 'morris-create-bug-chart',
            data: data["records"],
            xkey: 'user_name',
            ykeys: ['bug_count'],
            labels: ['bug总数'],
            resize: true,
            // barRatio: 0.4,
            // xLabelAngle: 270,
        });
    };
    req.ajax_req();
}

